home *** CD-ROM | disk | FTP | other *** search
- ' +---------------------------------------------------------------------------+
- ' | Program........: PDEMO.SRC |
- ' | Function.......: Product demo for FontLIB. |
- ' | Programmer(s)..: Kevin Spatz |
- ' | Last Revision..: 04/14/88 |
- ' +---------------------------------------------------------------------------+
-
-
- Define.environment:
-
- Option Base 0
-
- Rem $DYNAMIC
- Dim FONT1%(255,18), FONT2%(255,18), FONT3%(255,18), St$(5)
- Dim FONT4%(255,18), FONT5%(255,18), FONT6%(255,18)
-
- On ERROR goto Error.Handler
-
-
- Load.fonts:
-
- On ERROR goto Load.fonts.error
-
- Open "7X5.FNT" for input as #1: Close 1
- Call Load.char.set( "7X5.FNT", FONT1%() )
-
- Open "8X8.FNT" for input as #1: Close 1
- Call Load.char.set( "8X8.FNT", FONT2%() )
-
- Open "14X8.FNT" for input as #1: Close 1
- Call Load.char.set( "14X8.FNT", FONT3%() )
-
- Open "16X16.FNT" for input as #1: Close 1
- Call Load.char.set( "16X16.FNT", FONT4%() )
-
- Open "8X16.FNT" for input as #1: Close 1
- Call Load.char.set( "8X16.FNT", FONT5%() )
-
- Open "16X8.FNT" for input as #1: Close 1
- Call Load.char.set( "16X8.FNT", FONT6%() )
-
- On ERROR goto Error.Handler
- goto Initialize.program.variables
-
-
- Load.fonts.error:
-
- Print "All six .FNT files are reqired for this demo."
- Print " "
- Print " 7X5.FNT 16X8.FNT 14X8.FNT "
- Print " 8X8.FNT 8X16.FNT 16X16.FNT "
- Print " "
- Resume QUIT
-
-
- Initialize.program.variables:
-
- St$(1) = " " ' Error message return
- St$(2) = "3" ' COLOR
- Dx = 1
- Dy = 1
-
-
- Sense.diplay.type:
-
- Test.EGA:
- On ERROR goto Test.CGA
- scrn% = 9
- Screen scrn%
- Palette 0,0
- Palette 1,12
- Palette 2,9
- Palette 3,63
- On ERROR goto Error.Handler
- Goto Page1
- Test.CGA:
- On ERROR goto No.graphics
- scrn% = 2
- Screen scrn%
- On ERROR goto Error.Handler
- Goto Page1
- No.graphics:
- Print "EGA or CGA adapter required for demo."
- Goto QUIT
-
-
- Page1: '( Intro screen defines the problem )
-
- cls
- Print " "
- Print " "
- Print "QuickBASIC programmers, has this happened to you: "
- Print " "
- Print "You have a problem! You've used the LINE, CIRCLE, PAINT, COLOR, PSET, WINDOW,"
- Print "VIEW and DRAW commands to assemble a clean, crisp, graphic display, and now's "
- Print "the time to add the text. But wait, can it be? With all the flexibility you "
- Print "had with the other commands, you would think that placing text on the screen "
- Print "at any desired location would be a snap. Think again! "
- Print " "
- Print "Aside from the fact that you are limited to only one font (8x8 in CGA, 14x8 in"
- Print "EGA), you are also forced to place your text at only the 25 row by 80 column "
- Print "positions that can be defined by a 'LOCATE row,column' command. "
- Print " "
- Print "If you would be kind enough to hit any key, I will plot an imaginary graph to "
- Print "illustrate this point. "
- Print " "
- Print " "
- Print " <<< Anywhere in the demo => Hit any key when ready for the next screen >>> "
- Print " "
- Gosub Wait.for.a.key
-
-
- Page2: '( Display plot without fonts - point out problems )
-
- cls
- Gosub Draw.graph
- If scrn%=2 Then
- Locate 01,29: Print "Sales - The Big Corporation"
- Locate 23,15: Print " JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC"
- Locate 04,05: Print "$450,000"
- Locate 06,05: Print "$400,000"
- Locate 08,05: Print "$350,000"
- Locate 10,05: Print "$300,000"
- Locate 12,05: Print "$250,000"
- Locate 14,05: Print "$200,000"
- Locate 16,05: Print "$150,000"
- Locate 18,05: Print "$100,000"
- Locate 20,05: Print " $50,000"
- Call FPrint( Font1%(),180., 40.,1.,1.,"THE TITLE DOESN'T STAND OUT",St$() )
- Call FPrint( Font1%(),244., 50.,1.,1.,"AND",St$() )
- Call FPrint( Font1%(),140., 60.,1.,1.,"THE AXIS LABELS CAN'T BE ALIGNED PROPERLY",St$() )
- Else
- Locate 01,29: Print "Sales - The Big Corporation"
- Locate 23,15: Print " JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC"
- Locate 03,05: Print "$650,000"
- Locate 06,05: Print "$550,000"
- Locate 09,05: Print "$450,000"
- Locate 12,05: Print "$350,000"
- Locate 15,05: Print "$250,000"
- Locate 18,05: Print "$150,000"
- Locate 21,05: Print " $50,000"
- Call FPrint( Font1%(),190., 50.,1.,1.," ( THE TITLE CERTAINLY FAILS TO STAND OUT. ) ",St$() )
- Call FPrint( Font1%(),177.,270.,1.,1.," ( THE AXIS LABELS CAN'T BE ALIGNED PROPERLY. ) ",St$() )
- End If
- Gosub Wait.for.a.key
-
-
- Page3: '( How about the IIS solution? )
-
- cls
- Print " "
- Print " "
- Print "It wouldn't be fair of us to point this glaring problem out if we didn't have "
- Print "a reasonable solution to offer you, right? So, suppose I told you that I have"
- Print "the means of allowing you to place any string of characters on any resolution "
- Print "graphics screen with positional control down to the pixel. In addition, each "
- Print "string could be printed in any font size (from 2x2 all the way up to 16x16) "
- Print "and in any supported color. And, so as not to box you in, each font file can "
- Print "be edited if it is not to your liking, or new ones can be created. "
- Print " "
- Print "If you would again hit any key, I will redisplay the previous imaginary graph,"
- Print "using FontLIB routines to turn an OK graphic screen into an eye catcher. "
- Print " "
- Gosub Wait.for.a.key
-
-
- Page4: '( Display enhanced plots - isn't it nice? )
-
- cls
- Gosub Draw.graph
-
- If scrn%=2 Then
-
- Call FPrint( Font4%(), 108., 18.,1.,1.,"Sales - The Big Corporation",St$() )
-
- Call FPrint( Font2%(), 30., 35.,1.,1.,"$450,000",St$() )
- Call FPrint( Font2%(), 30., 50.,1.,1.,"$400,000",St$() )
- Call FPrint( Font2%(), 30., 65.,1.,1.,"$350,000",St$() )
- Call FPrint( Font2%(), 30., 80.,1.,1.,"$300,000",St$() )
- Call FPrint( Font2%(), 30., 95.,1.,1.,"$250,000",St$() )
- Call FPrint( Font2%(), 30.,110.,1.,1.,"$200,000",St$() )
- Call FPrint( Font2%(), 30.,125.,1.,1.,"$150,000",St$() )
- Call FPrint( Font2%(), 30.,140.,1.,1.,"$100,000",St$() )
- Call FPrint( Font2%(), 30.,155.,1.,1.," $50,000",St$() )
-
- Call FPrint( Font3%(),116.,180.,1.,1.,"Jan",St$() )
- Call FPrint( Font3%(),151.,180.,1.,1.,"Feb",St$() )
- Call FPrint( Font3%(),186.,180.,1.,1.,"Mar",St$() )
- Call FPrint( Font3%(),221.,180.,1.,1.,"Apr",St$() )
- Call FPrint( Font3%(),256.,180.,1.,1.,"May",St$() )
- Call FPrint( Font3%(),291.,180.,1.,1.,"Jun",St$() )
- Call FPrint( Font3%(),326.,180.,1.,1.,"Jul",St$() )
- Call FPrint( Font3%(),361.,180.,1.,1.,"Aug",St$() )
- Call FPrint( Font3%(),396.,180.,1.,1.,"Sep",St$() )
- Call FPrint( Font3%(),431.,180.,1.,1.,"Oct",St$() )
- Call FPrint( Font3%(),466.,180.,1.,1.,"Nov",St$() )
- Call FPrint( Font3%(),501.,180.,1.,1.,"Dec",St$() )
-
- Call FPrint( Font1%(),185., 40.,1.,1.,"THE TITLE STANDS OUT NOW",St$() )
- Call FPrint( Font1%(),244., 50.,1.,1.,"AND",St$() )
- Call FPrint( Font1%(),150., 60.,1.,1.,"THE AXIS LABELS ARE ALIGNED PROPERLY",St$() )
-
- Else
-
- Call FPrint( Font4%(), 108., 22.,1.,1.,"Sales - The Big Corporation",St$() )
-
- Call FPrint( Font2%(), 30., 44.,1.,1.,"$650,000",St$() )
- Call FPrint( Font2%(), 30., 64.,1.,1.,"$600,000",St$() )
- Call FPrint( Font2%(), 30., 84.,1.,1.,"$550,000",St$() )
- Call FPrint( Font2%(), 30.,104.,1.,1.,"$500,000",St$() )
- Call FPrint( Font2%(), 30.,124.,1.,1.,"$450,000",St$() )
- Call FPrint( Font2%(), 30.,144.,1.,1.,"$400,000",St$() )
- Call FPrint( Font2%(), 30.,164.,1.,1.,"$350,000",St$() )
- Call FPrint( Font2%(), 30.,184.,1.,1.,"$300,000",St$() )
- Call FPrint( Font2%(), 30.,204.,1.,1.,"$250,000",St$() )
- Call FPrint( Font2%(), 30.,224.,1.,1.,"$200,000",St$() )
- Call FPrint( Font2%(), 30.,244.,1.,1.,"$150,000",St$() )
- Call FPrint( Font2%(), 30.,264.,1.,1.,"$100,000",St$() )
- Call FPrint( Font2%(), 30.,284.,1.,1.," $50,000",St$() )
-
- Call FPrint( Font3%(),116.,320.,1.,1.,"Jan",St$() )
- Call FPrint( Font3%(),151.,320.,1.,1.,"Feb",St$() )
- Call FPrint( Font3%(),186.,320.,1.,1.,"Mar",St$() )
- Call FPrint( Font3%(),221.,320.,1.,1.,"Apr",St$() )
- Call FPrint( Font3%(),256.,320.,1.,1.,"May",St$() )
- Call FPrint( Font3%(),291.,320.,1.,1.,"Jun",St$() )
- Call FPrint( Font3%(),326.,320.,1.,1.,"Jul",St$() )
- Call FPrint( Font3%(),361.,320.,1.,1.,"Aug",St$() )
- Call FPrint( Font3%(),396.,320.,1.,1.,"Sep",St$() )
- Call FPrint( Font3%(),431.,320.,1.,1.,"Oct",St$() )
- Call FPrint( Font3%(),466.,320.,1.,1.,"Nov",St$() )
- Call FPrint( Font3%(),501.,320.,1.,1.,"Dec",St$() )
-
- Call FPrint( Font1%(),190., 50.,1.,1.," ( THE TITLE STANDS OUT NOW. ) ",St$() )
- Call FPrint( Font1%(),177.,270.,1.,1.," ( ALL AXIS LABELS ARE ALIGNED PROPERLY. ) ",St$() )
-
- End If
- Gosub Wait.for.a.key
-
-
- Page5: '( Display enhanced plots - isn't it nice? )
-
- cls
- Call FPrint( Font3%(), 20., 15.,1.,1.,"Why use the regular size font when you can also use:",St$() )
- Call FPrint( Font1%(), 40., 40.,1.,1.,"A very small 7x5 size font,",St$() )
- Call FPrint( Font2%(), 40., 60.,1.,1.,"or the EGA 43 line 8x8 size font,",St$() )
- Call FPrint( Font3%(), 40., 80.,1.,1.,"or the standard 14x8 size font,",St$() )
- Call FPrint( Font4%(), 40.,100.,1.,1.,"or the jumbo 16x16 size font,",St$() )
- Call FPrint( Font5%(), 40.,120.,1.,1.,"or the double wide 8x16 size font,",St$() )
- Call FPrint( Font6%(), 40.,140.,1.,1.,"or the double height 16x8 size font.",St$() )
- Call FPrint( Font3%(), 20.,180.,1.,1.,"And if that's not enough, design your own!",St$() )
- Gosub Wait.for.a.key
-
-
- Page6: '( IIS - product and ordering info - misc. )
-
- Screen 0: Color 15
- cls
- Print "Maybe you're saying, 'Not bad, can I do that too?' The answer, as you might "
- Print "have guessed is 'YES'. And, (sigh of relief) very easily at that! "
- Print " "
- Print "For the low price of $29.95, you get: "
- Print " "
- Print " *** FontLIB - The library file (Load, Save & Print fonts) "
- Print " *** FontEDIT - The font editor "
- Print " *** Bit14x8 - 14x8 pixel character set "
- Print " *** Bit8x8 - 8x8 pixel character set "
- Print " *** Bit7x5 - 7x5 pixel character set "
- Print " *** Bit16x16 - 16x16 pixel character set "
- Print " *** Bit16x8 - 16x8 pixel character set "
- Print " *** Bit8x16 - 8x16 pixel character set "
- Print " *** Instructions - Yes, we even tell you how to use it! "
- Print " "
- Print " Intelligent Industrial Systems, Inc. "
- Print " 333 Meadowland Parkway "
- Print " Secaucus, New Jersey 07094 "
- Print " (201) 319-1200 "
- Print " "
- Print "If you want your graphic screens to look the best they can, you owe it to "
- Print "yourself to investigate FontLIB. ";
-
- Goto QUIT
-
-
- Draw.graph:
-
- If scrn% = 2 Then
- Line (100, 19)-(540,166),,B
- Line (116,100)-(140,166),,BF
- Line (151,110)-(175,166),,BF
- Line (186,115)-(210,166),,BF
- Line (221,155)-(245,166),,BF
- Line (256,160)-(280,166),,BF
- Line (291,140)-(315,166),,BF
- Line (326,130)-(350,166),,BF
- Line (361,110)-(385,166),,BF
- Line (396, 80)-(420,166),,BF
- Line (431, 50)-(455,166),,BF
- Line (466, 45)-(490,166),,BF
- Line (501, 30)-(525,166),,BF
- For I=166 to 19 step -15
- Line (100,I)-(105,I)
- Next I
- Line (100,166)-(540,166)
- Else
- Line (100, 30)-(540,300), 3, B
- Line (116,100)-(139,300), 1, BF
- Line (151,110)-(174,300), 2, BF
- Line (186,115)-(209,300), 1, BF
- Line (221,170)-(244,300), 2, BF
- Line (256,200)-(279,300), 1, BF
- Line (291,180)-(314,300), 2, BF
- Line (326,160)-(349,300), 1, BF
- Line (361,150)-(384,300), 2, BF
- Line (396, 90)-(419,300), 1, BF
- Line (431, 80)-(454,300), 2, BF
- Line (466, 75)-(489,300), 1, BF
- Line (501, 50)-(524,300), 2, BF
- Line (116,100)-(151,110), 3
- Line (151,110)-(186,115), 3
- Line (186,115)-(221,170), 3
- Line (221,170)-(256,200), 3
- Line (256,200)-(291,180), 3
- Line (291,180)-(326,160), 3
- Line (326,160)-(361,150), 3
- Line (361,150)-(396, 90), 3
- Line (396, 90)-(431, 80), 3
- Line (431, 80)-(466, 75), 3
- Line (466, 75)-(501, 50), 3
- For I=300 to 30 step -20
- Line (100,I)-(105,I), 3
- Next I
- Line (100,300)-(540,300), 3, B
- End If
- Return
-
-
- Wait.for.a.key:
-
- aa$ = INKEY$
- If aa$ = "" goto Wait.for.a.key
- Return
-
-
- Error.Handler:
-
- On ERROR goto 0
-
-
- QUIT:
-
- End
-
-
- ' +---------------------------------------------------------------------------+
- ' | End Module |
- ' +---------------------------------------------------------------------------+